package com.qidianit.mes.device.mapper;

import com.qidianit.mes.pojo.DeviceMainPlan;
import com.qidianit.mes.pojo.DeviceMaintainItem;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface DeviceMainPlanMapper {
    List<DeviceMainPlan> list(@Param("planCode") String planCode, @Param("planName") String planName, @Param("planType") String planType, @Param("planStatus") String planStatus);

    void add(DeviceMainPlan deviceMainPlan);

    List<DeviceMaintainItem> listItemsByPlanId(@Param("planCode") String planCode);

    List<DeviceMaintainItem> listledgersByPlanId(String planCode);

    void addMainPlanOfItem(@Param("projectCodes") List<String> projectCodes, @Param("planCode") String planCode);

    void addMainPlanOfLedger(@Param("deviceCode") List<String> deviceCode, @Param("planCode") String planCode);

    void edit(DeviceMainPlan deviceMainPlan);

    void deleteMainPlanOfItem(@Param("projectCode") List<String> projectCode, @Param("planCode") String planCode);

    void deleteMainPlanOfLedger(@Param("deviceCode") List<String> deviceCode, @Param("planCode") String planCode);
}
